package com.hm.add2;

import java.util.Random;

public class Beer extends Drink implements Lotto{
    Random r=new Random();
    @Override
    public void taste() {
        System.out.println("我是有故事的啤酒，味道是涩的");
    }

    public Beer(String name, double price) {
        super(name, price);
    }

    @Override
    public double lotto() {
        System.out.println(getName() + "啤酒正在参与开盖有奖活动");
        return Math.random()*getPrice();
    }
}
